home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
pdcurs21.zip
/
PORTABLE.ZIP
/
BAUDRATE.C
next >
Wrap
Text File
|
1992-11-21
|
2KB
|
53 lines
#include <limits.h>
#define CURSES_LIBRARY 1
#include <curses.h>
#undef baudrate
#ifndef NDEBUG
char *rcsid_baudrate = "$Header: c:/curses/portable/RCS/baudrate.c%v 2.0 1992/11/15 03:28:45 MH Rel $";
#endif
/*man-start*********************************************************************
baudrate() - Return terminal baud rate
X/Open Description:
Returns the output speed of the terminal. The number returned
is bits per second, for example 9600, and is an integer.
PDCurses Description:
If FAST_VIDEO is true, then this is the largest possible
(portable) int value (INT_MAX from limits.h) IF direct
video is possible, OR the approximate guess at BIOS speeds,
19200.
If FAST_VIDEO is false, this is an approximate guess at BIOS
speeds, 19200.
X/Open Return Value:
The baudrate() function returns a pointer to a verbose description
of the current terminal on success and the null pointer on error.
X/Open Errors:
No errors are defined for this function.
Portability:
PDCurses int baudrate( void );
X/Open Dec '88 int baudrate( void );
BSD Curses
SYS V Curses
**man-end**********************************************************************/
int baudrate(void)
{
#ifdef FAST_VIDEO
return (_cursvar.direct_video ? INT_MAX : 19200 );
#else
return (19200); /* Approx. guess at BIOS speeds.*/
#endif
}